<?php
// define array
$arr = array('one', 'two', 'three', 'four');

// convert array to string
// output: 'one and two and three and four'
$str = implode(' and ', $arr);
print_r($str);
// define string
$str = 'tinker,tailor,soldier,spy';

// convert string to array
// output: ('tinker', 'tailor', 'soldier, 'spy')
$arr = explode(',', $str);
print_r($arr);
